using System;
using System.ComponentModel.DataAnnotations;
using UwinEducation.Shared.Enums;

namespace UwinEducation.Application.Dtos
{
    /// <summary>
    /// 预约DTO
    /// </summary>
    public class AppointmentDto
    {
        /// <summary>
        /// 预约ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        public Guid OrderId { get; set; }

        /// <summary>
        /// 学生ID
        /// </summary>
        public Guid StudentId { get; set; }

        /// <summary>
        /// 学号
        /// </summary>
        public string StudentNo { get; set; }

        /// <summary>
        /// 学生姓名
        /// </summary>
        public string StudentName { get; set; }

        /// <summary>
        /// 教师ID
        /// </summary>
        public Guid TeacherId { get; set; }

        /// <summary>
        /// 教师姓名
        /// </summary>
        public string TeacherName { get; set; }

        /// <summary>
        /// 预约状态
        /// </summary>
        public AppointmentStatus Status { get; set; }

        /// <summary>
        /// 预约截止时间
        /// </summary>
        public DateTime Deadline { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal Amount { get; set; }
        public TeacherDto? Teacher { get; set; }
    }

    /// <summary>
    /// 创建预约DTO
    /// </summary>
    public class CreateAppointmentDto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        [Required(ErrorMessage = "订单ID不能为空")]
        public Guid OrderId { get; set; }

        /// <summary>
        /// 学生ID
        /// </summary>
        [Required(ErrorMessage = "学生ID不能为空")]
        public Guid StudentId { get; set; }

        /// <summary>
        /// 教师ID
        /// </summary>
        public Guid? TeacherId { get; set; }

        /// <summary>
        /// 预约截止时间
        /// </summary>
        [Required(ErrorMessage = "预约截止时间不能为空")]
        public DateTime Deadline { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal? Amount { get; set; }
    }

    /// <summary>
    /// 更新预约DTO
    /// </summary>
    public class UpdateAppointmentDto
    {
        /// <summary>
        /// 预约ID
        /// </summary>
        public Guid Id { get; set; }
        /// <summary>
        /// 教师ID
        /// </summary>
        public Guid? TeacherId { get; set; }

        /// <summary>
        /// 预约状态
        /// </summary>
        public AppointmentStatus? Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal? Amount { get; set; }
    }
} 